package com.service.impl;

import com.mapper.CarMapper;
import com.pojo.Car;
import com.service.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author xu
 * @Description
 * @Date 2022.2.23
 */
@Service("CarService")
public class CarServiceImpl implements CarService {

    @Autowired
    private CarMapper carMapper;


    @Override
    public List<Car> getCar(Integer cid) {
        List<Car> list = carMapper.selectAll(cid);
        if (list!=null){
            return list;
        }
        return null;
    }

    @Override
    public List<Car> findCar(Integer cid) {
        List<Car> list = carMapper.findAll(cid);
        if (list!=null){
            return list;
        }
        return null;
    }
}
